<template>
  <div class="collapse-btn" @click="clickHandler">
      <SvgIcon name="collapse_all"/>
  </div>
</template>

<script>
import {useStore} from 'vuex'
export default {
    name: 'CollapseBtn',
    setup(){
        const {dispatch} = useStore()

        const clickHandler = ()=>{
            dispatch('menu/collapse')
        }

        return{
            clickHandler
        }
    }
}
</script>

<style lang="scss" >
    .collapse-btn{
        display: inline-block;
        padding: 0 17px;
        &:hover{
            cursor: pointer;
            background-color: rgba(0,0,0,0.3);
        }
    }
</style>